package com.luli.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.FieldType;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.io.Serializable;



/**
 * 陆离
 * 2022/5/24 16:54:51
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document( collection= "test")  //表名
public class MongoTest implements Serializable {
    @MongoId(FieldType.OBJECT_ID)
    @Field("_id")
    private Long id;
    @Field("age")
    private Integer ageS;
    @Field("name")
    private String names;
    @Field("_class")
    private String classTest;

}
